Integrand size = 17, antiderivative size = 97 \[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {2 b^2 n^2 x^3}{3 \left (9+4 b^2 n^2\right )}+\frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{9+4 b^2 n^2}+\frac {2 b n x^3 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{9+4 b^2 n^2} \]
2/3*b^2*n^2*x^3/(4*b^2*n^2+9)+3*x^3*cos(a+b*ln(c*x^n))^2/(4*b^2*n^2+9)+2*b *n*x^3*cos(a+b*ln(c*x^n))*sin(a+b*ln(c*x^n))/(4*b^2*n^2+9)
Time = 0.14 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.63 \[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^3 \left (9+4 b^2 n^2+9 \cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+6 b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )\right )}{6 \left (9+4 b^2 n^2\right )} \]
(x^3*(9 + 4*b^2*n^2 + 9*Cos[2*(a + b*Log[c*x^n])] + 6*b*n*Sin[2*(a + b*Log [c*x^n])]))/(6*(9 + 4*b^2*n^2))
Time = 0.22 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4991, 15}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx\) |
\(\Big \downarrow \) 4991 |
\(\displaystyle \frac {2 b^2 n^2 \int x^2dx}{4 b^2 n^2+9}+\frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b n x^3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle \frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b n x^3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b^2 n^2 x^3}{3 \left (4 b^2 n^2+9\right )}\) |
(2*b^2*n^2*x^3)/(3*(9 + 4*b^2*n^2)) + (3*x^3*Cos[a + b*Log[c*x^n]]^2)/(9 + 4*b^2*n^2) + (2*b*n*x^3*Cos[a + b*Log[c*x^n]]*Sin[a + b*Log[c*x^n]])/(9 + 4*b^2*n^2)
3.1.91.3.1 Defintions of rubi rules used
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[Cos[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_)*((e_.)*(x_))^(m_. ), x_Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Cos[d*(a + b*Log[c*x^n])]^p/(b^ 2*d^2*e*n^2*p^2 + e*(m + 1)^2)), x] + (Simp[b*d*n*p*(e*x)^(m + 1)*Sin[d*(a + b*Log[c*x^n])]*(Cos[d*(a + b*Log[c*x^n])]^(p - 1)/(b^2*d^2*e*n^2*p^2 + e* (m + 1)^2)), x] + Simp[b^2*d^2*n^2*p*((p - 1)/(b^2*d^2*n^2*p^2 + (m + 1)^2) ) Int[(e*x)^m*Cos[d*(a + b*Log[c*x^n])]^(p - 2), x], x]) /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + (m + 1)^2, 0]
Time = 2.32 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.63
method | result | size |
parallelrisch | \(\frac {x^{3} \left (4 b^{2} n^{2}+6 b n \sin \left (2 b \ln \left (c \,x^{n}\right )+2 a \right )+9 \cos \left (2 b \ln \left (c \,x^{n}\right )+2 a \right )+9\right )}{24 b^{2} n^{2}+54}\) | \(61\) |
Time = 0.25 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.78 \[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {2 \, b^{2} n^{2} x^{3} + 6 \, b n x^{3} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + 9 \, x^{3} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2}}{3 \, {\left (4 \, b^{2} n^{2} + 9\right )}} \]
1/3*(2*b^2*n^2*x^3 + 6*b*n*x^3*cos(b*n*log(x) + b*log(c) + a)*sin(b*n*log( x) + b*log(c) + a) + 9*x^3*cos(b*n*log(x) + b*log(c) + a)^2)/(4*b^2*n^2 + 9)
\[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\begin {cases} \int x^{2} \cos ^{2}{\left (a - \frac {3 i \log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = - \frac {3 i}{2 n} \\\int x^{2} \cos ^{2}{\left (a + \frac {3 i \log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = \frac {3 i}{2 n} \\\frac {2 b^{2} n^{2} x^{3} \sin ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{12 b^{2} n^{2} + 27} + \frac {2 b^{2} n^{2} x^{3} \cos ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{12 b^{2} n^{2} + 27} + \frac {6 b n x^{3} \sin {\left (a + b \log {\left (c x^{n} \right )} \right )} \cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{12 b^{2} n^{2} + 27} + \frac {9 x^{3} \cos ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{12 b^{2} n^{2} + 27} & \text {otherwise} \end {cases} \]
Piecewise((Integral(x**2*cos(a - 3*I*log(c*x**n)/(2*n))**2, x), Eq(b, -3*I /(2*n))), (Integral(x**2*cos(a + 3*I*log(c*x**n)/(2*n))**2, x), Eq(b, 3*I/ (2*n))), (2*b**2*n**2*x**3*sin(a + b*log(c*x**n))**2/(12*b**2*n**2 + 27) + 2*b**2*n**2*x**3*cos(a + b*log(c*x**n))**2/(12*b**2*n**2 + 27) + 6*b*n*x* *3*sin(a + b*log(c*x**n))*cos(a + b*log(c*x**n))/(12*b**2*n**2 + 27) + 9*x **3*cos(a + b*log(c*x**n))**2/(12*b**2*n**2 + 27), True))
Leaf count of result is larger than twice the leaf count of optimal. 301 vs. \(2 (95) = 190\).
Time = 0.25 (sec) , antiderivative size = 301, normalized size of antiderivative = 3.10 \[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {3 \, {\left (2 \, {\left (b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) - b \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right )\right )} n + 3 \, \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) + 3 \, \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + 3 \, \cos \left (2 \, b \log \left (c\right )\right )\right )} x^{3} \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 3 \, {\left (2 \, {\left (b \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) + b \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \cos \left (2 \, b \log \left (c\right )\right )\right )} n - 3 \, \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) + 3 \, \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - 3 \, \sin \left (2 \, b \log \left (c\right )\right )\right )} x^{3} \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 2 \, {\left (4 \, {\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + 9 \, \cos \left (2 \, b \log \left (c\right )\right )^{2} + 9 \, \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} x^{3}}{12 \, {\left (4 \, {\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + 9 \, \cos \left (2 \, b \log \left (c\right )\right )^{2} + 9 \, \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )}} \]
1/12*(3*(2*(b*cos(2*b*log(c))*sin(4*b*log(c)) - b*cos(4*b*log(c))*sin(2*b* log(c)) + b*sin(2*b*log(c)))*n + 3*cos(4*b*log(c))*cos(2*b*log(c)) + 3*sin (4*b*log(c))*sin(2*b*log(c)) + 3*cos(2*b*log(c)))*x^3*cos(2*b*log(x^n) + 2 *a) + 3*(2*(b*cos(4*b*log(c))*cos(2*b*log(c)) + b*sin(4*b*log(c))*sin(2*b* log(c)) + b*cos(2*b*log(c)))*n - 3*cos(2*b*log(c))*sin(4*b*log(c)) + 3*cos (4*b*log(c))*sin(2*b*log(c)) - 3*sin(2*b*log(c)))*x^3*sin(2*b*log(x^n) + 2 *a) + 2*(4*(b^2*cos(2*b*log(c))^2 + b^2*sin(2*b*log(c))^2)*n^2 + 9*cos(2*b *log(c))^2 + 9*sin(2*b*log(c))^2)*x^3)/(4*(b^2*cos(2*b*log(c))^2 + b^2*sin (2*b*log(c))^2)*n^2 + 9*cos(2*b*log(c))^2 + 9*sin(2*b*log(c))^2)
Leaf count of result is larger than twice the leaf count of optimal. 833 vs. \(2 (95) = 190\).
Time = 0.46 (sec) , antiderivative size = 833, normalized size of antiderivative = 8.59 \[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\text {Too large to display} \]
1/6*x^3 - 1/4*(4*b*n*x^3*e^(pi*b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*t an(b*n*log(abs(x)) + b*log(abs(c)))^2*tan(a) + 4*b*n*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan(b*n*log(abs(x)) + b*log(abs(c)))^2*tan (a) + 4*b*n*x^3*e^(pi*b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*tan(b*n*lo g(abs(x)) + b*log(abs(c)))*tan(a)^2 + 4*b*n*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan(b*n*log(abs(x)) + b*log(abs(c)))*tan(a)^2 - 3*x ^3*e^(pi*b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*tan(b*n*log(abs(x)) + b *log(abs(c)))^2*tan(a)^2 - 3*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan(b*n*log(abs(x)) + b*log(abs(c)))^2*tan(a)^2 - 4*b*n*x^3*e^(pi* b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*tan(b*n*log(abs(x)) + b*log(abs( c))) - 4*b*n*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan(b*n* log(abs(x)) + b*log(abs(c))) - 4*b*n*x^3*e^(pi*b*n*sgn(x) - pi*b*n + pi*b* sgn(c) - pi*b)*tan(a) - 4*b*n*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan(a) + 3*x^3*e^(pi*b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*ta n(b*n*log(abs(x)) + b*log(abs(c)))^2 + 3*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan(b*n*log(abs(x)) + b*log(abs(c)))^2 + 12*x^3*e^(pi* b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*tan(b*n*log(abs(x)) + b*log(abs( c)))*tan(a) + 12*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*b*sgn(c) + pi*b)*tan( b*n*log(abs(x)) + b*log(abs(c)))*tan(a) + 3*x^3*e^(pi*b*n*sgn(x) - pi*b*n + pi*b*sgn(c) - pi*b)*tan(a)^2 + 3*x^3*e^(-pi*b*n*sgn(x) + pi*b*n - pi*...
Time = 27.23 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.68 \[ \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^3}{6}+\frac {x^3\,{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}}\,1{}\mathrm {i}}{8\,b\,n+12{}\mathrm {i}}+\frac {x^3\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}}{12+b\,n\,8{}\mathrm {i}} \]